﻿using ST.Common.Util.Mvc;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ST.Buz.Base.ViewModel
{
	public partial class VMS_IMS_FinanceRecv : BaseSearchModel
	{
		/*
		 int pageNum
			, int pageSize
			, string sortOrder
			, string fromName
			, string sno
			, int? state
			, DateTime dtStart
			, DateTime dtEnd
		 */
		public string sno { get; set; }

		public int? partnerid { get; set; }

		public string partnername { get; set; }

		public int[] state { get; set; }

		public int? orderid { get; set; }

		public int? dueid { get; set; }

		public DateTime date_s { get; set; }

		public DateTime date_e { get; set; }

		public int[] ids { get; set; }
	}

	public partial class VM_FinanceRecv
	{
		/// <summary>
		/// 应收款ID
		/// </summary>
		public int DueID { get; set; }

		/// <summary>
		/// 流水号
		/// </summary>
		public string SNo { get; set; }

		/// <summary>
		/// 期次
		/// </summary>
		public string Stage { get; set; }

		/// <summary>
		/// 应收款日期
		/// </summary>
		public DateTime? DueDate { get; set; }

		/// <summary>
		/// 应付款业务类型（采购款、销售退款）
		/// </summary>
		public int BuzType { get; set; }

		/// <summary>
		/// 业务单据ID
		/// </summary>
		public int BuzID { get; set; }

		/// <summary>
		/// 业务单据流水号
		/// </summary>
		public string BuzSNo { get; set; }

		/// <summary>
		/// 客户ID
		/// </summary>
		public int PartnerID { get; set; }

		/// <summary>
		/// 客户名
		/// </summary>
		public string PartnerName { get; set; }

		/// <summary>
		/// 收款状态
		/// </summary>
		public string RecvStateText { get; set; }

		/// <summary>
		/// 应收款总额
		/// </summary>
		public decimal TotalRecvDue { get; set; }

		/// <summary>
		/// 已收款总额
		/// </summary>
		public decimal TotalRecved { get; set; }

		/// <summary>
		/// 剩余收款金额
		/// </summary>
		public decimal TotalRecvLeft { get; set; }

		/// <summary>
		/// 本次收款金额
		/// </summary>
		public decimal Recv { get; set; }

		/// <summary>
		/// 应收款备注
		/// </summary>
		public string Comment { get; set; }



		/// <summary>
		/// 收款时间
		/// </summary>
		public DateTime RecvDate { get; set; }

		/// <summary>
		/// 对方支付方式
		/// </summary>
		[Column("RecvWay")]
		public int RecvWay { get; set; }

		/// <summary>
		/// 收款凭证号
		/// </summary>
		[Column("BillNo")]
		[StringLength(30, ErrorMessage = "{0}长度不能超过{1}")]
		public string BillNo { get; set; }

		/// <summary>
		/// 是否开发票
		/// </summary>
		[Column("Invoice")]
		public bool Invoice { get; set; }

		/// <summary>
		/// 发票号码
		/// </summary>
		[Column("InvoiceNo")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string InvoiceNo { get; set; }


		/// <summary>
		/// 收款单备注
		/// </summary>
		public string Remark { get; set; }
	}

	public partial class VM_FinanceRecvPartner
	{

		/// <summary>
		/// 客户ID
		/// </summary>
		public int PartnerID { get; set; }

		/// <summary>
		/// 客户名
		/// </summary>
		public string PartnerName { get; set; }

		/// <summary>
		/// 应收款总额
		/// </summary>
		public decimal TotalRecvDue { get; set; }

		/// <summary>
		/// 已收款总额
		/// </summary>
		public decimal TotalRecved { get; set; }

		/// <summary>
		/// 剩余收款金额
		/// </summary>
		public decimal TotalRecvLeft { get; set; }

		/// <summary>
		/// 本次收款金额
		/// </summary>
		public decimal Recv { get; set; }

		/// <summary>
		/// 应收款备注
		/// </summary>
		public string Comment { get; set; }



		/// <summary>
		/// 收款时间
		/// </summary>
		public DateTime RecvDate { get; set; }

		/// <summary>
		/// 对方支付方式
		/// </summary>
		[Column("RecvWay")]
		public int RecvWay { get; set; }

		/// <summary>
		/// 收款凭证号
		/// </summary>
		[Column("BillNo")]
		[StringLength(30, ErrorMessage = "{0}长度不能超过{1}")]
		public string BillNo { get; set; }

		/// <summary>
		/// 是否开发票
		/// </summary>
		[Column("Invoice")]
		public bool Invoice { get; set; }

		/// <summary>
		/// 发票号码
		/// </summary>
		[Column("InvoiceNo")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string InvoiceNo { get; set; }


		/// <summary>
		/// 收款单备注
		/// </summary>
		public string Remark { get; set; }
	}

}
